/** * Minified by jsDelivr using Terser v3.14.1. * Original file: /npm/http-vue-loader@1.4.1/src/httpVueLoader.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(t,e){"object"==typeof module&&"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.httpVueLoader=e()}(this,function(){"use strict";var t=0;function e(t,e){this.component=t,this.elt=e}function n(t,e){this.component=t,this.elt=e,this.module={exports:{}}}function i(t,e){this.component=t,this.elt=e}function o(t){this.name=t,this.template=null,this.script=null,this.styles=[],this._scopeId=""}function s(t){return t}function r(t){var e=t.match(/(.*?)([^\/]+?)\/?(\.vue)?(\?.*|#.*|$)/);return{name:e[2],url:e[1]+e[2]+(void 0===e[3]?"/index.vue":e[3])+e[4]}}function u(t,e){return"./"===e.substr(0,2)||"../"===e.substr(0,3)?t+e:e}function l(t,e){var n=r(t);return l.load(n.url,e)}return e.prototype={withBase:function(t){var e;if(this.component.baseURI){(e=document.createElement("base")).href=this.component.baseURI;var n=this.component.getHead();n.insertBefore(e,n.firstChild)}t.call(this),e&&this.component.getHead().removeChild(e)},scopeStyles:function(t,e){function n(){for(var n=t.sheet,i=n.cssRules,o=0;o':"")+o;for(var r=s.body.firstChild;r;r=r.nextSibling)switch(r.nodeName){case"TEMPLATE":this.template=new i(this,r);break;case"SCRIPT":this.script=new n(this,r);break;case"STYLE":this.styles.push(new e(this,r))}return this}.bind(this))},_normalizeSection:function(t){return(null!==t&&t.elt.hasAttribute("src")?l.httpRequest(t.elt.getAttribute("src")).then(function(e){return t.elt.removeAttribute("src"),e}):Promise.resolve(null)).then(function(e){if(null!==t&&t.elt.hasAttribute("lang")){var n=t.elt.getAttribute("lang");return t.elt.removeAttribute("lang"),l.langProcessor[n.toLowerCase()].call(this,null===e?t.getContent():e)}return e}.bind(this)).then(function(e){null!==e&&t.setContent(e)})},normalize:function(){return Promise.all(Array.prototype.concat(this._normalizeSection(this.template),this._normalizeSection(this.script),this.styles.map(this._normalizeSection))).then(function(){return this}.bind(this))},compile:function(){return Promise.all(Array.prototype.concat(this.template&&this.template.compile(),this.script&&this.script.compile(),this.styles.map(function(t){return t.compile()}))).then(function(){return this}.bind(this))}},l.load=function(t,e){return function(){return new o(e).load(t).then(function(t){return t.normalize()}).then(function(t){return t.compile()}).then(function(t){var e=null!==t.script?t.script.module.exports:{};return null!==t.template&&(e.template=t.template.getContent()),void 0===e.name&&void 0!==t.name&&(e.name=t.name),e._baseURI=t.baseURI,e})}},l.register=function(t,e){var n=r(e);t.component(n.name,l.load(n.url))},l.install=function(t){t.mixin({beforeCreate:function(){var e=this.$options.components;for(var n in e)if("string"==typeof e[n]&&"url:"===e[n].substr(0,4)){var i=r(e[n].substr(4)),o="_baseURI"in this.$options?u(this.$options._baseURI,i.url):i.url;isNaN(n)?e[n]=l.load(o,n):e[n]=t.component(i.name,l.load(o,i.name))}}})},l.require=function(t){return window[t]},l.httpRequest=function(t){return new Promise(function(e,n){var i=new XMLHttpRequest;i.responseType="text",i.open("GET",t),i.onreadystatechange=function(){4===i.readyState&&(i.status>=200&&i.status<300?e(i.responseText):n(i.status))},i.send(null)})},l.langProcessor={html:s,js:s,css:s},l.scriptExportsHandler=s,l}); //# sourceMappingURL=/sm/5bc5a8b811dd61216db976e3d9609396d245132c5b0f895820e89deeadefef88.map